﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="JQueryWidget.WidgetWeb._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Src="~/WebUserControl1.ascx" TagName="WebUserControl1" TagPrefix="WidgetWeb" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder><br />
         
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <div class="wrapdiv"></div>
        <div class="wrapserverdiv" id="dddd" runat="server">
         <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
        </div>
        <input  type="checkbox" value="WrapServer" class="WrapServer"/>
        <input type="button" value="Wrap" class="wrapbutton"/>
        <script type="text/javascript">
            $(document).ready(function () {
                $(".wrapbutton").click(function () {
                    if ($(".WrapServer").attr("checked")) {
                        $(".TestButton").appendTo($(".wrapserverdiv"));
                        $(".TestText").appendTo($(".wrapserverdiv"));
                    }
                    else {
                        $(".TestButton").appendTo($(".wrapdiv"));
                    }
                });
            });
        </script>
    </div>
    </form>
</body>
</html>
